﻿using EachRecord.ViewModels;
using EachRecord.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Mvvm;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EachRecord.Moudles
{
    /// <summary>
    /// 主模块
    /// </summary>
   public class MainMoudle : IModule
    {
        private readonly IRegionManager _regionManager;
        /// <summary>
        /// 注入模块管理员
        /// </summary>
        /// <param name="regionManager"></param>
        public MainMoudle(IRegionManager regionManager) { 
            _regionManager= regionManager;
        }
        /// <summary>
        ///  添加模块下的页面view
        /// </summary>
        /// <param name="containerProvider"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void OnInitialized(IContainerProvider containerProvider)
        {
            //_regionManager.RegisterViewWithRegion("ContentRegion", typeof(MainWindow));
        }
        /// <summary>
        /// View 绑定 ViewModel
        /// </summary>
        /// <param name="containerRegistry"></param>
        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //ViewModelLocationProvider.Register<MainWindow, MainWindowViewModel>();
        }
    }
}
